package driver.service;

import driver.dao.UserDao_a;
import driver.dao.UserDaoImpl_a;
import driver.entity.School;
import driver.entity.User;

import java.sql.SQLException;
import java.util.ArrayList;

public class UserServiceImpl_a implements UserService_a {
    private UserDao_a dao=new UserDaoImpl_a();
    @Override
    public ArrayList<School> selectAll() throws SQLException {
        return dao.selectAll();
    }

    @Override
    public ArrayList<User> selectAlluser() throws SQLException {
        return dao.selectAll2();
    }

    @Override
    public boolean delete(int id) throws SQLException {
        return dao.delete(id);
    }

    @Override
    public boolean add(User user) throws SQLException {
        return dao.add(user);
    }

    @Override
    public boolean addschool(School school) throws SQLException {
        return dao.addschool(school);
    }



}
